package com.alghtroms.sort;

import java.util.Arrays;

public class MaoPao {

	public static void maoPaoSort(int array[]){
       for(int i=0;i<array.length-1;i++)
    	   for(int j=i+1;j<array.length;j++){
    		   if(array[j]<array[i]){
    			   int temp=array[i];
    			       array[i]=array[j];
    			       array[j]=temp;
    		   }
    	   }
	}
	
	public static void main(String[] args) {
		int array[]={1,2,3,4,9,8,7,10,5,11};
		maoPaoSort(array);
		System.out.println(Arrays.toString(array));
	}
}